<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function _initialize()
    {
        header("Access-Control-Allow-Origin:*");
    }

    public function  index(){
//        $users = I('name');
//        $pwd = I('pass');
//        dump($users);
//
//        $db = M("cartecher");
//        $list = $db->select();
//        $count=$db->count();
//
//        $db2=M('user');
//        $userinfo=$db2->where("name='$users'")->find();
//
//        echo json_encode(array("status" => "ok", "count" => $count,"teclist" => $list, 'info' => '成功','user'=>$users,'pwd'=>$pwd,'userinfo'=>$userinfo), JSON_UNESCAPED_UNICODE);
        $list['cname'] = I('cname');
        $list['number'] = I('number');
        $list['grade'] = I('grade');
        $list['area'] = I('area');

        M("form")->data($list)->add();
    }
}
